package com.jiangyg.mall.product.dto;

import com.jiangyg.mall.core.support.validation.constraints.IntAnyValue;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 类描述：spu规格参数
 *
 * @author jiangyg
 * @email email@jiangyg.com
 * @date 2021-10-30 07:38:50
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode
@AllArgsConstructor
public class SpuAttrDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性id
     */
    @NotNull
    private Long id;

    /**
     * 快速展示【是否展示在介绍上；0-否 1-是】，在sku中仍然可以调整
     */
    @NotNull
    @IntAnyValue({0, 1})
    private Integer visible;

    /**
     * 可选值列表[用逗号分隔]
     */
    @NotNull
    private String options;

}
